package main

import "fmt"

type Vertex struct {
	X int
	Y int
	x int
	y int
}

var (
	v1 = Vertex{1, 2, 3, 4}  // has type Vertex
	v2 = Vertex{X: 1}        // Y:0 is implicit
	v3 = Vertex{}            // X:0 and Y:0
	p  = &Vertex{1, 2, 3, 4} // has type *Vertex
)

func main() {
	v := Vertex{1, 2, 3, 4}
	v.X = 4
	v.Y = 5
	v.x = 6
	v.y = 7
	fmt.Println(v)
	fmt.Println(v.X, v.Y, v.x, v.y)

	p := &v
	p.X = 1e9
	fmt.Println(*p)

	fmt.Println(v1, p, v2, v3)
}
